﻿<Window x:Class="BallOnTiltablePlate.JanRapp.MainApp.MainWindow"
        xmlns="http://schemas.microsoft.com/netfx/2009/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:helper="clr-namespace:BallOnTiltablePlate.JanRapp.MainApp.Helper"
        xmlns:controls="clr-namespace:BallOnTiltablePlate.JanRapp.Controls"
        Title="Ball on Tilitable Plate"
        Width="340"
        MinHeight="650"
        d:MinWidth="340"
        d:MaxWidth="340"
        SizeToContent="Height"
        d:DesignHeight="566.5"
        Loaded="Window_Loaded"
        x:ClassModifier="internal"
        mc:Ignorable="d">
    <Window.Resources>
        <RoutedCommand x:Key="ProcessorSettings">
            <RoutedCommand.InputGestures>
                <KeyGesture>Control+J</KeyGesture>
            </RoutedCommand.InputGestures>
        </RoutedCommand>
        <RoutedCommand x:Key="PreprocessorSettings">
            <RoutedCommand.InputGestures>
                <KeyGesture>Control+P</KeyGesture>
            </RoutedCommand.InputGestures>
        </RoutedCommand>
        <RoutedCommand x:Key="InputSettings">
            <RoutedCommand.InputGestures>
                <KeyGesture>Control+I</KeyGesture>
            </RoutedCommand.InputGestures>
        </RoutedCommand>
        <RoutedCommand x:Key="OutputSettings">
            <RoutedCommand.InputGestures>
                <KeyGesture>Control+O</KeyGesture>
            </RoutedCommand.InputGestures>
        </RoutedCommand>
        <RoutedCommand x:Key="GlobalSettings">
            <RoutedCommand.InputGestures>
                <KeyGesture>Control+S</KeyGesture>
            </RoutedCommand.InputGestures>
        </RoutedCommand>
    </Window.Resources>
    <Window.CommandBindings>
        <CommandBinding Command="{StaticResource ResourceKey=PreprocessorSettings}" 
                        CanExecute="SettingsCmdCanExecute"
                        Executed ="SettingsCmdExecuted"/>
                        <!--Executed="PreprocessorSettingsCmdExecuted" />-->
        <CommandBinding Command="{StaticResource ResourceKey=ProcessorSettings}" 
                        CanExecute="SettingsCmdCanExecute"
                        Executed ="SettingsCmdExecuted"/>
                        <!--Executed="JugglerSettingsCmdExecuted" />-->
        <CommandBinding Command="{StaticResource ResourceKey=InputSettings}" 
                        CanExecute="SettingsCmdCanExecute"
                        Executed ="SettingsCmdExecuted"/>
                        <!--Executed="InputSettingsCmdExecuted" />-->
        <CommandBinding Command="{StaticResource ResourceKey=OutputSettings}" 
                        CanExecute="SettingsCmdCanExecute"
                        Executed ="SettingsCmdExecuted"/>
                        <!--Executed="OutputSettingsCmdExecuted" /?>-->
        <CommandBinding Command="{StaticResource ResourceKey=GlobalSettings}"
                        Executed ="GlobalSettingsCmdExecuted"/>
                        <!--Executed="GeneralSettingsCmdExecuted" />-->
    </Window.CommandBindings>
    <StackPanel>
        <Menu>
            <MenuItem Header="_File">
            </MenuItem>
            <MenuItem Header="_Settings">
                <MenuItem Command="{StaticResource PreprocessorSettings}" Header="_Preprocessor" />
                <MenuItem Command="{StaticResource ProcessorSettings}" Header="Pr_ocessor" />
                <MenuItem Command="{StaticResource InputSettings}" Header="_Input" />
                <MenuItem Command="{DynamicResource OutputSettings}" Header="_Output" />
                <Separator />
                <MenuItem Command="{StaticResource GlobalSettings}" Header="Global _Settings"/>
            </MenuItem>
        </Menu>
        <Grid Margin="7">
            <Button x:Name="AlgorithmSettingButton"
                    Width="75"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    Command="{StaticResource ProcessorSettings}"
                    Content="Settings"
                    ToolTip="Processor Settings (Ctrl+J)" />
            <Label HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Content="Pr_ocessor"
                   Target="{Binding ElementName=ProcessorList}" />
        </Grid>
        <TreeView x:Name="ProcessorList"
                  Margin="7,0" 
                  SelectedValuePath="DataContext"
                  SelectedItemChanged="ProcessorList_SelectionChanged"
                  />
        <Grid Margin="7">
            <Button x:Name="PreprocessorSettingButton"
                    Width="75"
                    Margin="0"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    Command="{StaticResource PreprocessorSettings}"
                    Content="Settings"
                    Padding="7,1"
                    ToolTip="Preprocessor Settings (Ctrl+P)" />
            <Label HorizontalAlignment="Left"
                   VerticalAlignment="Top"
                   Content="_Preprocessor"
                   Target="{Binding ElementName=PreprocessorList}" />
        </Grid>
        <TreeView x:Name="PreprocessorList"
                 Margin="7,0"
                  SelectedValuePath="DataContext"
                  SelectedItemChanged="PreprocessorList_SelectionChanged"
                 />
        <Grid Margin="7">
            <Button x:Name="InputSettingButton"
                    Width="75"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    Command="{StaticResource InputSettings}"
                    Content="Settings"
                    ToolTip="Input Settings (Ctrl+I)" />
            <Label HorizontalAlignment="Left"
                   Content="_Input"
                   Target="{Binding ElementName=InputList,
                                    Mode=OneWay}"
                   d:LayoutOverrides="Height" />
        </Grid>
        <TreeView x:Name="InputList"
                 Margin="7,0"
                 SelectedValuePath="DataContext"
                 SelectedItemChanged="InputList_SelectionChanged"
                 />
        <Grid Margin="7">
            <Button x:Name="OutputSettingButton"
                    Width="75"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    Command="{StaticResource OutputSettings}"
                    Content="Settings"
                    ToolTip="Output Settings (Ctrl+O)" />
            <Label HorizontalAlignment="Left"
                   Content="_Output"
                   Target="{Binding ElementName=OutputList,
                                    Mode=OneWay}"
                   d:LayoutOverrides="Height" />
        </Grid>
        <TreeView x:Name="OutputList"
                 Margin="7,0"
                  SelectedValuePath="DataContext"
                  SelectedItemChanged="OutputList_SelectionChanged"
                 />
    </StackPanel>
</Window>